import "./inedx.scss";

interface IconFontProps {
  // 图标名称
  name: string;
  // 颜色
  color?: string;
  // 大小
  size?: string;
}

/**
 * iconfont 字体图标
 * 样式文件：src/styles/iconfont
 */
const IconFont: React.FC<IconFontProps> = ({ name, size, color }) => {
  return <div className="iconfont-box">
    <span className={`iconfont icon-${name}`} style={
      {
        color: color,
        fontSize: size
      }
    }></span>
  </div>
};

export default IconFont